<%# jQuery %>
<script type="text/javascript"><%= File.read(File.dirname(__FILE__) + "/jquery/jquery-1.7.1.min.js") %></script>

<%# Common highlighting %>
<script type="text/javascript"><%= File.read(File.dirname(__FILE__) + "/highlight_js/highlight.pack.js") %></script>
<style><%= File.read(File.dirname(__FILE__) + "/highlight_js/github.css") %></style>
<script type="text/javascript">
$(document).ready(function() {
  $('pre code').each(function(i, e) {
    if (e.className)
      hljs.highlightBlock(e, hljs.tabReplace);
  });
});
</script>

<%# MathJax %>
<% if var[:options][:use_tex] %>
	<script type="text/x-mathjax-config">
	MathJax.Hub.Config({
	  jax: ["input/TeX","output/HTML-CSS"],
	  extensions: ["tex2jax.js"],
	  tex2jax: {
		element: null,
		inlineMath: [
		  ['$','$']
		],
		displayMath: [
		  ['$$','$$']
		],
		skipTags: ["script","noscript","style","textarea","pre","code"],
		processEscapes: false,
		processEnvironments: true,
		preview: "TeX"
	  }
	});
	</script>
	<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<% end %>
